Skip to content

Fix pyproject.toml parsing failure on Windows CRLF line endings#12

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-pyproject-toml-flow
Draft

Fix pyproject.toml parsing failure on Windows CRLF line endings#12
Copilot wants to merge 2 commits intomainfrom
copilot/fix-pyproject-toml-flow

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 11, 2026

pyproject.toml files with Windows-style CRLF line endings fail to parse when comments are present — the @iarna/toml parser rejects \r as a control character inside comments, silently breaking environment creation.

Fix

Normalize CRLF → LF in tomlParse() before handing content to the parser:

// pipUtils.ts
return tomljs.parse(content.replace(/\r\n/g, '\n'));

Tests

New suite Pip Utils - getProjectInstallable (pyproject.toml parsing) covering scenarios not previously tested:

  • CRLF with and without comments — regression cases for this bug
  • Missing [build-system] or [project] — no installable added
  • Invalid package name / missing requires — correct validation errors returned; installable still offered
  • Optional dependency extras — each group surfaces as a separate installable
  • Unparseable TOML — silent failure, no crash
  • Editable install args — verifies -e flag and project directory path
Original prompt

implement this fix - include tests (if they don't exist for the pyproject.toml flow yet create them for a wider variety than just this specific bug)

[Chronological Review: The conversation began with the user asking for an opinion on a specific GitHub issue related to Python, referencing issue #25809. The user sought clarification on whether the issue pertains to Python itself or Python environments. The conversation has not progressed beyond this inquiry.]

[Intent Mapping: The user explicitly requested an opinion on the GitHub issue, asking, "what do you think of this issue? is it python or python envs?"]

[Technical Inventory: The conversation references a GitHub issue related to the Microsoft VSCode Python extension, specifically concerning the distinction between Python and Python environments.]

[Code Archaeology: No specific files or code changes have been discussed in this conversation.]

[Progress Assessment: The conversation is currently at the inquiry stage, with no tasks completed or pending.]

[Context Validation: The user is seeking clarification on a GitHub issue, which is essential for understanding the broader context of their work with Python environments.]

[Recent Commands Analysis: The last agent command was the user request for an opinion on a GitHub issue. There were no tool results to summarize as the conversation has not progressed to any tool execution.]

1. Conversation Overview: - Primary Objectives: The user requested an opinion on GitHub issue #25809, asking, "what do you think of this issue? is it python or python envs?" - Session Context: The conversation has focused on clarifying the nature of a specific GitHub issue related to Python and its environments. - User Intent Evolution: The user has not changed direction; they are seeking clarity on a specific issue.
  1. Technical Foundation:
  • [Core Technology 1]: Python - The conversation revolves around issues related to Python and its environments within the context of the VSCode Python extension.
  1. Codebase Status:
  • No specific files or code changes have been discussed.
  1. Problem Resolution:
  • Issues Encountered: The user is trying to determine the nature of a GitHub issue.
  • Solutions Implemented: None at this stage; the user is still inquiring.
  1. Progress Tracking:
  • Completed Tasks: None.
  • Partially Complete Work: The user is currently seeking clarification on a GitHub issue.
  • Validated Outcomes: None.
  1. Active Work State:
  • Current Focus: The user is focused on understanding the implications of GitHub issue #25809.
  • Recent Context: The user has asked for an opinion on whether the issue pertains to Python or Python environments.
  • Working Code: No code snippets have been discussed.
  • Immediate Context: The user is awaiting feedback on the GitHub issue.
  1. Recent Operations:
  • Last Agent Commands: The user asked for an opinion on a GitHub issue.
  • Tool Results Summary: No tool results were generated as the conversation has not progressed to tool execution.
  • Pre-Summary State: The agent was actively responding to the user's inquiry about the GitHub issue when the token budget was exceeded.
  • Operation Context: The user is looking for insights on a specific issue to inform their understanding of Python environments.
  1. Continuation Plan:
  • [Pending Task 1]: The user needs clarification on GitHub issue #25809.
  • [Next Action]: The immediate next step is to provide an opinion on the issue, determining whether it relates to Python or Python environments.

Created from VS Code.


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix pyproject.toml flow and add tests Fix pyproject.toml parsing failure on Windows CRLF line endings Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants